<?xml version="1.0" encoding="utf-8"?>
<!-- This comment will force IE7 to go into quirks mode. -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
<link rel="stylesheet" type="text/css" href="../../CSS/Contents.css"></link>
<script type="text/javascript" src="../../JS/Common.js"></script>
<title>NonNull&lt;T&gt; Class</title>
</head>
<body>
<div id="Header">
<div id="ProjectTitle">Documentation Project</div>
<div id="PageTitle">NonNull&lt;T&gt; Class</div>
<div id="HeaderShortcuts">
<a href="#SectionHeader0" onclick="javascript: SetSectionVisibility(0, true); SetExpandCollapseAllToCollapseAll();">Syntax</a>&nbsp;
<a href="#SectionHeader1" onclick="javascript: SetSectionVisibility(1, true); SetExpandCollapseAllToCollapseAll();">Remarks</a>&nbsp;
<a href="#SectionHeader2" onclick="javascript: SetSectionVisibility(2, true); SetExpandCollapseAllToCollapseAll();">Members</a>&nbsp;
</div>
<div class="DarkLine"></div>
<div class="LightLine"></div>
<div id="HeaderToolbar">
<img id="ExpandCollapseAllImg" src="../../GFX/SmallSquareExpanded.gif" alt="" style="vertical-align: top;" onclick="javascript: ToggleAllSectionsVisibility();" />
<span id="ExpandCollapseAllSpan" onclick="javascript: ToggleAllSectionsVisibility();">Collapse All</span>
</div>
</div>
<div id="Contents">
<a id="ContentsAnchor">&nbsp;</a>
This class encapsulates a non-null reference. An of this class instance serves as evidence
            that the encapsulated reference is not null.
<div id="ItemLocation">
<b>Namespace:</b> <a href="../../Contents/1/208.html">Sasa</a><br />
<b>Assembly:</b> <a href="../../Contents/1/1.html">Sasa</a>
</div>
<div id="SectionHeader0" class="SectionHeader">
<img id="SectionExpanderImg0" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(0);" />
<span class="SectionHeader">
<span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(0);">
Syntax
</span>
</span>
</div>

<div id="SectionContainerDiv0" class="SectionContainer">
<table class="CodeTable"><col width="100%" /><tr class="CodeTable"><th class="CodeTable">C#</th></tr><tr class="CodeTable"><td class="CodeTable"><table style="width: 100%;" class="InsideCodeBlock">
<col width="0%" />
<col width="100%" />
<tr>
<td class="NoWrapTop">public sealed class NonNull&lt;T&gt; :&nbsp;</td>
<td>
ValueType,<br />IEquatable&lt;TCollection&gt;,<br />
IEquatable&lt;NonNull&lt;T&gt;&gt;,<br />
IValue&lt;T&gt;
</td>
</tr>
</table>
<div style="padding-left: 30px; margin-top: 0px;">
<table class="InsideCodeBlock">
<col />
<col width="100%" />
<tr>
<td class="NoWrapTop">where T</td>
<td>&nbsp;: class</td>
</td>
</tr>
</table>
</div>
</td></tr></table>
<div class="CommentHeader">Type Parameters</div>
<div class="CommentParameterName">T</div>
<div class="ParameterCommentContainer">
The type of the encapsulated reference.
</div>
<div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div>
<div id="SectionHeader1" class="SectionHeader">
<img id="SectionExpanderImg1" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(1);" />
<span class="SectionHeader">
<span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(1);">
Remarks
</span>
</span>
</div>

<div id="SectionContainerDiv1" class="SectionContainer">
<div class="RemarksContainer">
Proper usage is to never create or declare NonNull types as locals. NonNull should
            only be used to decorate method arguments. The only way an invalid instance of NonNull can
            be created is when declaring it as a local:
            ...
            NonNull&lt;T&gt; foo;
            ...
            T bar = foo; // NullReferenceException
            
            When it comes to high assurance code, you should utilize Option and NonNull types for
            method arguments, to declare which arguments may be null and which must necessarily be
            non-null. The type checker will ensure that values are handled properly within the method,
            and client code will receive the errors when passing in null references for NonNull values.
</div>
<div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div>
<div id="SectionHeader2" class="SectionHeader">
<img id="SectionExpanderImg2" src="../../GFX/BigSquareExpanded.gif" alt="Collapse/Expand" onclick="javascript: ToggleSectionVisibility(2);" />
<span class="SectionHeader">
<span class="ArrowCursor" onclick="javascript: ToggleSectionVisibility(2);">
Members
</span>
</span>
</div>

<div id="SectionContainerDiv2" class="SectionContainer">
<p>Click <a href="../../Contents/1/327.html">here</a> to see the list of members.</p>
<div class="TopLink"><a href="#ContentsAnchor">Top</a></div></div>
</div>
<div id="Footer">
<span class="Footer">Generated by <a href="http://immdocnet.codeplex.com/" target="_blank">ImmDoc .NET</a></span>.
</div>

</body>

</html>
